package com.meituan.sdk.model.tuangouNg.atomgoods.productAddonUpdate;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 创建或更新菜品加价属性信息
* This file was automatically generated.
*/
@ApiMeta(
    path = "/tuangou/ng/atomgoods/product/addon/update",
    businessId = 1,
    apiVersion = "10023",
    apiName = "product_addon_update",
    needAuth = true
)
public class ProductAddonUpdateRequest implements MeituanRequest<ProductAddonUpdateResponse> {
    /**
    * <p data-diff-id="ct-diff-id-71fb3422-ef0c-41e1-92d0-e579505762c5">附件信息/加价属性类型，1-总部, 2-门店</p>
    */
    @NotNull(message = "scope不能为空")
    @SerializedName("scope")
    private Integer scope;
    /**
    * <p data-diff-id="ct-diff-id-28744610-d85b-4fb0-914e-c7e605661942">总部code，当scope = 1时必填</p>
    */
    @SerializedName("vendorChainId")
    private String vendorChainId;
    /**
    * <p data-diff-id="ct-diff-id-a30cc5d4-8d3a-4d6e-b911-73faf2793bcd">门店code，当scope = 2时必填</p>
    */
    @SerializedName("vendorShopId")
    private String vendorShopId;
    /**
    * <p data-diff-id="ct-diff-id-51177ebf-cb8a-4f0e-a74d-f1d8ab22b6f2">加价属性、菜品附加信息</p>
    */
    @NotEmpty(message = "addOnList不能为空")
    @SerializedName("addOnList")
    private List<PAddon> addOnList;

    public Integer getScope() {
        return scope;
    }
    public void setScope(Integer scope) {
        this.scope = scope;
    }
    public String getVendorChainId() {
        return vendorChainId;
    }
    public void setVendorChainId(String vendorChainId) {
        this.vendorChainId = vendorChainId;
    }
    public String getVendorShopId() {
        return vendorShopId;
    }
    public void setVendorShopId(String vendorShopId) {
        this.vendorShopId = vendorShopId;
    }
    public List<PAddon> getAddOnList() {
        return addOnList;
    }
    public void setAddOnList(List<PAddon> addOnList) {
        this.addOnList = addOnList;
    }


    @Override
    public MeituanResponse<ProductAddonUpdateResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ProductAddonUpdateResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ProductAddonUpdateRequest{" + "scope=" + scope + "," + "vendorChainId=" + vendorChainId + "," + "vendorShopId=" + vendorShopId + "," + "addOnList=" + addOnList + "}";
    }
}
